const TODOLIST = 'bk-2011-todolist'
const TODOALLDONE = "bk-2011-todoalldone"

export const getTodoList = () => {
   return JSON.parse(localStorage.getItem(TODOLIST)) || []
}

export const setTodoList = (todolist) => {
    localStorage.setItem(TODOLIST,JSON.stringify(todolist))
}

export const getAllDone = () => {
    return JSON.parse(localStorage.getItem(TODOALLDONE) || 'false') 
}
 
 export const setAllDone = (checked) => {
     localStorage.setItem(TODOALLDONE,checked)
 }